<#import "/spring.ftl" as spring/>
<#import "/common/base.ftl" as base/>
<@base.page  "商品选择">
<style>
.goodsinfo{width: 100%;height: 34px;padding: 6px 12px;font-size: 14px;line-height: 1.42857143;color: #555;background-color: #fff;background-image: none;border: 1px solid #ccc;border-radius: 4px;}
.table-body{width:100%; height:300px;overflow-y:auto;overflow-x:hidden;margin-top:-10px;}

</style>
<div ng-controller="selectGoodsController">
	<div class="row"  style="margin-left:10px;">
		<strong  margin-left:5px;><p style="font-size:20px">商品选择列表</font></p>
		</strong>
	</div>
	<div class="ibox float-e-margins">
		<div class="ibox-content">
			<div id="DataTables_Table_0_wrapper" class="dataTables_wrapper form-inline" role="grid">
				<div class="row">
					<div class="col-sm-12">
						<div id="DataTables_Table_0_filter" >
							<div class="">
							    <label>货号:&nbsp;&nbsp;</label><input type="text" ng-model="taosku" name="taosku" style="width:100px" class="goodsinfo">
								<label>条形码:&nbsp;&nbsp;</label><input type="text" ng-model="bn" name="bn" style="width:100px" class="goodsinfo">
								<label>商品名称:&nbsp;&nbsp;</label><input type="text" ng-model="goodsName" name="goodsName" style="width:100px" class="goodsinfo">&nbsp;&nbsp;&nbsp;
								<button class="btn btn-primary" ng-click="Search()">查询</button>
								<button class="btn btn-primary" ng-click="Reset()">重置</button>
							</div>
						</div>
					</div>
				</div>
				 <div   >
				<table style="width:100%"  id="datatable" class="table table-striped table-bordered table-hover dataTables-example dataTable">

					<thead >
						<tr >
							<th style="width:10%"><input type="checkbox" ng-model="goodsAllIsSelected" ng-click="selectAll()"/></th>
							<th style="width:10%">货号</th>
							<th style="width:15%">条形码</th>
							<th style="width:25%">商品名称 </th>
							<th style="width:10%">税率</th>
							<th style="width:10%">箱规</th>
							<th style="width:10%">销售价</th>
							<th style="width:9.5%">在库成本价</th>
							<th id="scrollTh" style="width:0.5%"></th>
						</tr>
					</thead>
					</table>
					</div>
					 <div class="table-body"  when-scrolled="loadMore()" id="main">
					<table style="width:100%"  class="table table-striped table-bordered table-hover dataTables-example dataTable">
					
					<tbody >
						<tr ng-repeat="goods in goodsList" ng-dblclick="dbc($index)"  >
							<td style="width:10%"><input type="checkbox" ng-model="goods.IsSelected" ng-click="sel($index);"/></td>
							<td style="width:10%">{{goods.sku}}</td>
							<td style="width:15%">{{goods.barcode}}</td>
							<td style="width:25%">
							<a href="#" title={{goods.goodsName}} style="color: #676a6c;">
							    {{goods.goodsName | cut:false:20:' ...'}}
							     </a>
							</td>
							<td style="width:10%">{{goods.tax*100}}%</td>
							<td style="width:10%">{{goods.packing}}</td>
							<td style="width:10%">{{goods.salePrice}}</td>
							<td style="width:9.5%">{{goods.costPrice}}</td>
						</tr>

					</tbody>
				</table>
				</div>
				<table style="width:100%; margin-top:5px">
		            <tr>
		                <td align="center">
		                    <button type="button" class="btn btn-primary" id="btnOk" ng-click="confirm()">提交</button>&nbsp;&nbsp;
		                    <button type="button" class="btn btn-primary" id="btnCancel" ng-click="cancel()">关闭</button>
		                </td>
		            </tr>
	        	</table>
			</div>
		</div>
	</div>
</div>
<script src="<@spring.url '/assets/pagejs/supplier/supplier.js' />"></script>
</@base.page>
